home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac SampleCode New for 1.6 / ViewerCallbackSample / Headers / Viewer_Error.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-18  |  1.1 KB  |  67 lines  |  [TEXT/CWIE]

  1. /*  
  2.  *    Viewer_Error.h
  3.  *
  4.  *    QuickDraw 3D 1.6 Sample
  5.  *    Robert Dierkes
  6.  *
  7.  *     12/22/98    RDD        Created.
  8.  */
  9.  
  10. #ifndef _HViewer_Error
  11. #define _HViewer_Error
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. #include <Types.h>
  18.  
  19. void    Error_Alert(    short        iconType,
  20.                         char        *pMessage);
  21.  
  22. Boolean Error_ShowMessage(
  23.                         short        resStringIndex);
  24.  
  25.  
  26.     #define    USE_DEBUGGING    /* TODO */
  27.  
  28.  
  29.     #if defined(USE_DEBUGGING)
  30.         #define        DEBUGGING    1
  31.     #else
  32.         #define        DEBUGGING    0
  33.     #endif
  34.  
  35.     #if defined(USE_DEBUGGING)  || defined(ERROR_DEBUG_STR)
  36.         #undef    ERROR_DEBUG_STR
  37.         #define    ERROR_DEBUG_STR(s)    debugstr(s)
  38.     #else
  39.         #define    ERROR_DEBUG_STR(s)
  40.     #endif
  41.  
  42.     #if defined(USE_DEBUGGING)
  43.         #define    DEBUG_ASSERT(x,f)    \
  44.             if ((x) == 0) {    \
  45.                 char    msg[256];    \
  46.                 sprintf(msg, "%s %s (%d): (%s)", __FILE__, #f, __LINE__, #x);    \
  47.                 debugstr(msg);        \
  48.             }
  49.     #else
  50.         #define    DEBUG_ASSERT(x,f)
  51.     #endif
  52.  
  53.     #if defined(SYSTEM_BEEP)
  54.         #undef    SYSTEM_BEEP
  55.         #define    SYSTEM_BEEP()    System_Beep()
  56.         #include "Viewer_System.h"
  57.     #else
  58.         #define    SYSTEM_BEEP()
  59.     #endif
  60.  
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64.  
  65.  
  66. #endif /* _HViewer_Error */
  67.